﻿using System;
using InterfaceLiftLib.Converters.Json;
using Newtonsoft.Json;

namespace InterfaceLiftLib.Models
{
    public class Comment
    {
        [JsonProperty("id")]
        public int Id { get; protected set; }

        [JsonProperty("wallpaper_id")]
        public int WallpaperId { get; protected set; }

        [JsonProperty("comment_text")]
        public string CommentText { get; protected set; }

        [JsonProperty("date_timestamp")]
        [JsonConverter(typeof(UnixTimestampToDateTimeConverter))]
        public DateTime Date { get; protected set; }

        [JsonProperty("rating")]
        public int Rating { get; protected set; }

        [JsonProperty("user_id")]
        public int UserId { get; protected set; }

        [JsonProperty("user_name")]
        public string UserName { get; protected set; }

        [JsonProperty("user_avatar_url")]
        public string UserAvatarURL { get; protected set; }

        [JsonProperty("user_avatar_size_in_bytes")]
        public int UserAvatarSizeInBytes { get; protected set; }

        [JsonProperty("user_avatar_width")]
        public int UserAvatarWidth { get; protected set; }

        [JsonProperty("user_avatar_height")]
        public int UserAvatarHeight { get; protected set; }

        [JsonProperty("user_avatar_mime_type")]
        public string UserAvatarMimeType { get; protected set; }

        [JsonProperty("user_url_ifl_profile")]
        public string InterfaceLiftUserProfileURL { get; protected set; }
    }
}
